<%@ page language="java" import="com.alibaba.fastjson.JSONObject" pageEncoding="UTF-8" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%--判断是否已保存过试卷--%>
<%
    RecordSet rs = new RecordSet();
    JSONObject jsonData = new JSONObject();
    String formtable = "formtable_main_286";//在线考试答题
    String requestid = Util.null2String(request.getParameter("requestid"));
    String sql = "select count(id) from " + formtable + " where requestid=? and isnull(sfbc,1)=0";
    rs.executeQuery(sql, requestid);
    rs.next();
    boolean flag= Util.getIntValue(rs.getString(1), 0) > 0;
    jsonData.put( "flag", flag );
    out.print( jsonData.toJSONString() );

%>
